package net.jxtz.jxtzos.mapper.spider;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import net.jxtz.jxtzos.entity.spider.SpiderNanchangHousingAuthority;
import net.jxtz.jxtzos.entity.web.SpiderUpgrade;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface NanchangHousingAuthorityMapper extends BaseMapper<SpiderNanchangHousingAuthority> {

    /**
     * 获取到最新更新的数据和总数
     * @see SpiderUpgrade
     * @return List
     */
    @Select("select createTime as upgradeTime, COUNT(createTime) as upgradeCount from spider_housing_authority GROUP BY createTime ORDER BY createTime DESC")
    List<SpiderUpgrade> getUpgradeTimeAndCount();

}
